use sea_orm::{ActiveValue, IntoActiveValue, prelude::*};
use serde::{Deserialize, Serialize};

#[derive(
  Debug,
  Clone,
  Copy,
  PartialEq,
  Eq,
  Serialize,
  Deserialize,
  EnumIter,
  DeriveActiveEnum,
)]
#[serde(rename_all = "snake_case")]
#[sea_orm(
  rs_type = "String",
  db_type = "String(StringLen::None)",
  rename_all = "snake_case"
)]
pub enum Gender {
  // #[sea_orm(string_value = "male")]
  // #[serde(rename= "01")]
  Male,
  // #[sea_orm(string_value = "female")]
  // #[serde(rename= "02")]
  Female,
}

impl IntoActiveValue<Gender> for Gender {
  fn into_active_value(self) -> sea_orm::ActiveValue<Gender> {
    ActiveValue::Set(self)
  }
}
